package com.yspay.sample.config;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DirectPayConfig {
	// 合作商家私钥pkcs12证书路径
	public static final String PATH_PARTER_PKCS12 = "/WEB-INF/cert/shanghu_test.pfx";

	// 合作商家私钥pkcs12证书密码
	public static final String PASSWORD_PARTNER_PKCS12 = "123456";

	// 银盛公钥pkcs12证书路径    //##########
	public static final String PATH_YSEPAY_PUBLIC_CERT = "/WEB-INF/cert/businessgate.cer";

	// rsa算法名
	public static final String RSA_ALGORITHM = "SHA1WithRSA";

	// 签名算法
	public static final String SIGN_ALGORITHM = "RSA";

	// 使用商户自己的私钥签名请求时，采用的字符编码
	public static final String DEFAULT_CHARSET = "GBK";

	// 银盛分配给商家的商户号
	public static final String PLATFORM_PARTNER_NO = "shanghu_test";

	// 银盛分配给商家的商户号版本
	public static final String VERSION = "3.0";
	/**
	 * 产生订单号
	 */
	public static String produceOrderNo(){
	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
	Date d = new Date();
	String str1 = df.format(d).toString().replaceAll("-", "");	
	String str2 = "";
	for(int i = 0; i < 10; i++){
	str2 += (int)(Math.random()*10);
	}
	String str3 = str1 + str2;
	return str3;
	}

	// 银盛支付接入网关url
	//test测试地址   https://mertest.ysepay.com/openapi_gateway/gateway.do
	public static final String YSEPAY_GATEWAY_URL = "https://mertest.ysepay.com/openapi_gateway/gateway.do";
								

	
	//单笔加急代付url
	//public static final String YSEPAY_GATEWAY_URL_DF ="http://120.192.83.154:8027/Ky_System/online19/ysPay3AccToCardInvoke.action?name=请求参数";
	public static final String YSEPAY_GATEWAY_URL_DF ="https://dsf.ysepay.com/gateway.do";
	//https://qrcode.ysepay.com/gateway.do
	//public static final String YSEPAY_GATEWAY_URL = "https://10.211.52.49:8443/openapi_gateway/gateway.do";

}
